#ifndef SEMAPHORE_H
#define SEMAPHORE_H

#include "task.h"
#include "tick.h"
#include "config.h"

/*
	 there are 31 semaphores, stored in an unsigned int. The most significant bit is always set, 
	 because the task.wait field uses this bit to indicate whether or not it is waiting for 
	 a semaphore.
*/
unsigned int semaphoreState (void);
void semaphoreGive (unsigned int bits);
void semaphoreTake (unsigned int bits);

#endif

